<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/4/10
  Time: 21:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h1>学生查询</h1>
<hr/>
<table border="1">
    <tr>
        <th>姓名</th>
        <th>年龄</th>
        <th>性别</th>
        <th>操作</th>
    </tr>
    <c:if test="${not empty stus}">
        <c:forEach items="${stus}" var="stu">
            <tr>
                <td>${stu.name}</td>
                <td>${stu.age}</td>
                <td>${stu.sex == 1 ? '男':'女'}</td>
                <td>
                    <c:if test="${fn:contains(login_user.powers ,'3' )}">
                    <button onclick="javascript:location.href='deletestudent?dname=${stu.name}'">删除</button>
                    </c:if>
                </td>
            </tr>
        </c:forEach>
    </c:if>
</table>
</body>
</html>
